<template>
  <div id="app">
    <div id="nav">
      <el-menu
        class="el-menu-demo"
        mode="horizontal"
        background-color="#545c64"
        text-color="#fff"
        active-text-color="#ffd04b"
        router
      >
        <el-menu-item index="/">OpenLayers 6 主页</el-menu-item>
        <el-submenu index>
          <template slot="title" index="/">后台管理</template>
          <el-menu-item index="/about">数据配置</el-menu-item>
          <!-- <el-menu-item>选项2</el-menu-item>
          <el-menu-item>选项3</el-menu-item> -->
        </el-submenu>
      </el-menu>
      <!-- <router-link to="/">Home</router-link>|
      <router-link to="/about">About</router-link> -->
    </div>
    <router-view />
  </div>
</template>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#nav {
  height: 5vh;
}

#nav a {
  font-size: 2rem;
  font-weight: bold;
  color: #2c3e50;
}

#nav a.router-link-exact-active {
  font-size: 2rem;
  color: #42b983;
}

html,
body {
  margin: 0;
  padding: 0;
}
</style>
